import {takeEvery,put} from "redux-saga/effects"
import axios from "axios"

import {loadDataUserInfo} from "./actionCreator"



function* loadDataUserInfoAsync(){
    const result = yield axios.get(
        '/api/user'
    )
    yield put(loadDataUserInfo({"userInfo":result.data}))
}

function* MySaga(){
    yield takeEvery('loadDataUserInfoSaga',loadDataUserInfoAsync)
}

export default MySaga